/**
 * Created by bethinner on 6/7/16.
 */
import React, { Component } from 'react';

import { connect } from 'react-redux'
import Link from 'react-router/lib/Link'
import browserHistory from 'react-router/lib/browserHistory'


export default class GreenButton extends Component{
    constructor(props){
        super(props);
        this._clicked = this.clicked.bind(this);

    }

    componentWillMount(){

    }


    clicked(){
        this.props.onClick();
    }


    render(){
        return(
            <div style={{width:"76%",margin: "0 auto 20px auto" }}>

        <a  onClick={this._clicked} className="weui_btn weui_btn_primary">{this.props.text} </a>
            </div>

        )
    }
    
}

GreenButton.defaultProps = {
    onClick:null,
    text:"按钮",
}

GreenButton.propTypes = {
    onClick:React.PropTypes.func,
    text:React.PropTypes.string,
}


